﻿@model Stamp_For_Africa_Version_2.ViewModels.StampIndexFormViewModel

@Html.Partial("_SearchFilters", Model)


@{	if (Model.StampPage != null)
		{
			@Html.Partial("_SearchResults", Model.StampPage);			
		} 
}


@*<table>
	@using (Html.BeginForm("Index", "Stamps", FormMethod.Post, new { id = "TheForm" }))
 {
   
		<tr>
			<th>
			</th>
			<th valign="top" align="center">
				Name
			</th>
			<th valign="top" align="center">
				Country
				<br />
				@Html.DropDownListFor(x => x.SelectedCountryId, ViewBag.CountryList as IEnumerable<SelectListItem>, "--Select One--",
							new
							{
								onchange = "document.getElementById('TheForm').submit();"
							})
			</th>
			<th valign="top" align="center">
				Face Value
			</th>
			<th valign="top" align="center">
				MNH
			</th>
			<th valign="top" align="center">
				MH
			</th>
			<th valign="top" align="center">
				U
			</th>
			<th valign="top" align="center">
				Issued between
			</th>
			<th valign="top" align="center">
				Artist
				@Html.DropDownListFor(x => x.SelectedArtistId, ViewBag.ArtistList as IEnumerable<SelectListItem>, "--Select One--",
							new
							{
								onchange = "document.getElementById('TheForm').submit();"
							})
			</th>
			<th valign="top" align="center">
				Category
				@Html.DropDownListFor(x => x.SelectedCategoryId, ViewBag.CategoryList as IEnumerable<SelectListItem>, "--Select One--",
							new
							{
								onchange = "document.getElementById('TheForm').submit();"
							})
			</th>
			<th valign="top" align="center">
				Sub-Category
			</th>
		</tr>
 }
	@foreach (var item in Model.StampList)
 {
		<tr>
			<td>
				<img alt ="" src='@Url.Action("ShowStamp", "Stamps", new { item.Id })' width="100" height="auto"/>
			</td>
			<td>
				@Html.ActionLink(item.DisplayName, "Details", new { id = item.Id })
			</td>
			<td>
				@Html.DisplayFor(modelItem => item.Country.Name)
			</td>
			<td>
				@Html.DisplayFor(modelItem => item.FaceValue)
			</td>
			<td>
				@Html.DisplayFor(modelItem => item.ValueMintNeverHinged)
			</td>
			<td>
				@Html.DisplayFor(modelItem => item.ValueMintHinged)
			</td>
			<td>
				@Html.DisplayFor(modelItem => item.ValueUsed)
			</td>
			<td>
				@Html.DisplayFor(modelItem => item.ShortFromDate) - @Html.DisplayFor(modelItem => item.ShortToDate)
			</td>
			<td>
				@Html.DisplayFor(modelItem => item.Artist.DisplayName)
			</td>
			<td>
				@Html.DisplayFor(modelItem => item.Category.DisplayName)
			</td>
			<td>
				@Html.DisplayFor(modelItem => item.SubCategory)
			</td>
		</tr>
 }
</table>
*@